package org.kele.k8s.sc2020.vo;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class KeleResponse<T> {
    private String code;
    private String message;
    private T data;


    public static <T> KeleResponse<T> okBean(T data) {
        return new KeleResponse<T>().setCode("0").setMessage("success").setData(data);
    }


    public static <T> KeleResponse<T> errorBean(String code, String message) {
        return new KeleResponse<T>().setCode(code).setMessage(message);
    }


}
